package com.example.s10shoppingthymeleaf.service;

import com.example.s10shoppingthymeleaf.entity.Goods;
import com.example.s10shoppingthymeleaf.repository.GoodsMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GoodsService {

    @Autowired
    GoodsMapper goodsMapper;
    public List<Goods> getAllGoods(){
        //获取Goods数据表的所有记录，将记录存放在List中
       List<Goods> goodsList=  goodsMapper.selectList(null);
       return goodsList;
    }
}
